<?php

require_once 'Zend/View/Helper/Abstract.php';

class  Core_View_Helper_Admin_UsersModuleLinks extends Zend_View_Helper_Abstract
{
    /**
     * comments
     */
    public function usersModuleLinks($id = 'moduleList')
    {
        $u = new Model_User();
        $modules = $u->getCurrentUsersModules();
        if ($modules) {
            foreach ($modules as $module) {
                    $moduleLinks[] = '<a href="/mod_' . $module . '/index" class="' . $module . '">' . $module . '</a>';
            }
        }
        if (is_array($moduleLinks)) {
            return $this->view->htmlList($moduleLinks, null, array('id' => $id), false);
        }
    }
}